package com.battery.minapp.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 通用配置
 *
 * @author battery
 */
@Configuration
public class ResourcesConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        /** images目录下图片 */
        // TODO 这里放置图片
        registry.addResourceHandler("images" + "/**").addResourceLocations("file:" + "/opt/project/mDian/resources/images/miand" + "/");

        registry.addResourceHandler("dev" + "/**").addResourceLocations("file:" + "/opt/project/check" + "/");

        registry.addResourceHandler("" + "/**").addResourceLocations("file:" + "/opt/project/check" + "/");

    }
}